import React from "react";

import useTimer from "./useTimer";
import useCounter from "./useCounter";

const App = () => {
  const time = useTimer();
  const [count, add, minus] = useCounter();

  return (
    <>
      <h2>自定义hooks</h2>
      <button onClick={minus}>-</button>
      <span>{count}</span>
      <button onClick={add}>+</button>

      <hr />

      <p>{time}</p>
    </>
  );
};

export default App;
